<nz-upload
    [nzAction]='uploadPath'
    nzListType="picture-card"
    [(nzFileList)]="fileList"
    [nzPreview]='handlePreview'
    [nzShowButton]="fileList.length < acceptListLength"
    (nzChange)='handleUpload()'
    [nzName]='formName'
>

    <div>
        <i nz-icon nzType="plus"></i>
        <div style="margin-top: 8px">上传</div>
    </div>
</nz-upload>

<nz-modal
    [nzVisible]="previewVisible"
    [nzContent]="modalContent"
    [nzFooter]="null"
    (nzOnCancel)="previewVisible = false"
>
    <ng-template #modalContent>
        <ng-container *ngIf="avatarShowTemplate === null">
            <img [src]="previewImage" style="width: 100%"  alt=''/>
        </ng-container>
        <ng-container *ngIf='avatarShowTemplate !== null'>
            <div *ngTemplateOutlet="avatarShowTemplate"></div>
        </ng-container>
    </ng-template>
</nz-modal>
